﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace RicciWebsite
{
    public partial class contactus : RicciWebsite.Pages.PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            configInfo = configHelper.Get();
        }

        config configInfo;


        /// <summary>
        /// 获取email
        /// </summary>
        /// <returns></returns>
        protected string getEmail()
        {
            if (string.IsNullOrEmpty(configInfo.Email))
                return string.Empty;

            return string.Concat("Email：<a href='mailto:", configInfo.Email, "'>", configInfo.Email, "</a>");
        }

        /// <summary>
        /// 获取电话
        /// </summary>
        /// <returns></returns>
        protected string getPhone()
        {
            if (string.IsNullOrEmpty(configInfo.Phone))
                return string.Empty;

            return string.Concat(ResourceManagerSingleton.ResourceManager.GetString("Phone"), "：", configInfo.Phone);
        }

        /// <summary>
        /// 获取传真
        /// </summary>
        /// <returns></returns>
        protected string getFax()
        {
            if (string.IsNullOrEmpty(configInfo.Fax))
                return string.Empty;

            return string.Concat(ResourceManagerSingleton.ResourceManager.GetString("Fax"), "：", configInfo.Fax);
        }
    }
}
